home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 80 / CD Actual 80 Julio-Agosto 2003.iso / Linux / LinuxGazette / lg / issue47 / misc / tips / wspell < prev   
Encoding:
Text File  |  2002-08-14  |  767 b   |  57 lines

  1. #!/bin/sh
  2. #/usr/local/bin/wspell
  3. # a script to spell a word
  4. # by daa 1-11-98
  5. # usage:
  6. # " wspell "
  7. # or
  8. # " wspell <first_letters_of_word> "
  9. # or
  10. # " wspell <first_letters_of_word> <second_input_of_a_portion_word> "
  11.  
  12. noact () {
  13. echo -n " No action taken... Hit <ENTER> "
  14. read hit
  15. }
  16.  
  17. if test -z  $1
  18. then
  19. echo -n "
  20.  Enter the First few characte(s) of your word
  21.  As in the \"var\" in \" variable\": "
  22.  read word
  23. else
  24. word=$1
  25. fi
  26. case $word in
  27. "") : noact
  28.  ;;
  29. #
  30. *) :
  31. if test -z $2
  32. then
  33. echo -n "
  34.  Enter a few letters in the word ( Entries are Not required )
  35.  As in the \"abl\" in \"variable\": "
  36. read few
  37. case $few in
  38. "") :
  39.  look $word | less
  40. ;;
  41. #
  42. *) :
  43.  look $word | grep $few | less
  44.  ;;
  45. #
  46. esac
  47. else
  48. few=$2
  49. look $word | grep $few | less
  50. fi
  51. ;;
  52. #
  53. esac
  54. exit 0
  55. # End of File
  56.  
  57.